#ifndef VS_CAMERA_H
#define VS_CAMERA_H

#include "Point3D.h"
#include <gl\glut.h>
#include "..\glm\glm.hpp"

class VSCamera
{
public:
	enum RotatePlane { H, V };

	VSCamera(void);
	~VSCamera(void);

private:
//	void lookat();
//	void position();
//	void direction();
//	void up();

//	Point3D m_position;
	Point3D m_viewdirection;
//	Point3D m_upvector;
	Point3D m_viewpoint;
	float m_hangle;
	float m_vangle;
	float m_distance;

public:
	// executes some glRotates and a glTranslate command Note: You should call glLoadIdentity before using Render
	void Render ( void );
	// reset
	void ResetCamera ();

	// rotate the camera in rotate plane
	void RotateCamera (float angle, RotatePlane rotatePlane);	
	// translate the camera
	void MoveCamera ( Point3D Direction );
	// scale the camera
	void ScaleCamera ( float factor);

	// set viewpoint need transfer
	void setViewpoint (const Point3D & loc);
	// set the distance between viewpoint and camera
	void setDistance (float distance);
	glm::mat4 transformMat;
};

#endif